<h3><B>商铺合作维护</B></h3>
<br>
<a ng-click="addAgreement()" class="btn-primary btn-sm nodecoration">添加</a>
<br>
<br>
<div class="tab-content">
    <div class="tab-pane active" id="tab_a">
        <table class="table table-condensed">
            <thead>
            <tr>
                <th>币面金额</th>
                <th>结算金额</th>
                <th>奖励金额</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="agreement in agreementList">
                <td>{{agreement.voucher_val}}</td>
                <td>{{agreement.deal_price}}</td>
                <td>{{agreement.retailer_price}}</td>
                <td>
                    <a class="btn btn-secondary btn-xs"
                       ng-click="editAgreement(agreement)">编辑</a>
                    <a class="btn btn-danger btn-xs"
                       ng-click="deleteAgreement(agreement.id)">删除</a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>

<div class="modal fade" id="agree_model" tabindex="-1" role="dialog" aria-labelledby="helpModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span
                        class="sr-only">Close</span></button>
                <h5 class="modal-title" id="myModalLabel">添加商铺合作</h5>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" name="backendUserForm">
                    <div class="form-group" id="d_code">
                        <label class="control-label col-xs-2" for="role">币面金额:</label>

                        <div class="col-xs-2">
                            <select id="typeEdit" ng-model="agreement.voucher_type_id" class="form-control"
                                    ng-options="m.id as m.voucher_name for m in voucherType" required>
                                <option value="">-- 请选择 --</option>
                            </select>
                            <span style="color: #a94442">{{typeErrMsg}}</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputUserName" class="control-label col-xs-2">结算金额:</label>

                        <div class="col-xs-3">
                            <input type="text" class="form-control" ng-model="agreement.deal_price"
                                   required>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputUserName" class="control-label col-xs-2">奖励金额:</label>

                        <div class="col-xs-3">
                            <input type="text" class="form-control" ng-model="agreement.retailer_price"
                                   required>
                        </div>
                    </div>

                    <div class="modal-footer">
                        <button id="saveButton" type="submit" class="btn btn-default"
                                ng-click="saveAgreement(agreement)">
                            保存
                        </button>
                        <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="cancelSave()">取消
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>